/**
 * Routes is used to map events and controller actions.
 */

package config
{
	import cake.controller.Controller;
	import cake.Router;
	import flash.events.Event;
	import flash.utils.Dictionary;
	import mx.events.FlexEvent;
	
	
	public class Routes
	{
		//APP is used to access the controllers defined in the App class
		private var APP:App;
		public function Routes(app:App){
			if(!app || app == undefined){
				throw new Error('App is not defined');
			}
			
			APP= app;
			
			// place all routes here in the constructor
			Router.connect(FlexEvent.ENTER , APP.c.test);
			Router.connect(FlexEvent.ENTER , APP.menus.view);
			
		}		
	}
}